//
//  CarDetailsModel.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/10/17.
//

import UIKit
import ObjectMapper
class CarDetailsModel:  Mappable {
    var code: String?
    var msg: String?
    var data: CarDetailsContentModel?
    func mapping(map: Map) {
        code <- map["code"]
        msg <- map["msg"]
        data <- map["data"]
    }
    required init?(map: Map) {
        
    }
}

/*class CarDetailsContentModel:  Mappable {
    var appearanceImages: String?//外观图多张逗号拼接
    var backgroundImage: String?//车辆背景图片
    var brandId: Int?//车辆品牌ID
    var carNo: String?
    var createdTime: String?
    var delFlag: Int?
    var energy: String?//引擎种类
    var energyEn: String?
    var engine: String?//引擎
    var ownerNum: String?//前任车主数
    var engineChassisImages: String?//底盘图多张逗号拼接
    var engineEn: String?
    var exfactoryDate: String?//出厂日期
    var firstEn: String?
    var gearbox: String?//变速箱
    var gearboxEn: String?
    var id: Int?
    var interiorImages: String?//内饰图多张逗号拼接
    var isMarketable: Int?//是否上架 1是，0否
    var isReserve: Bool?//是否预售 1是，0否
    var isSell: Bool?//是否售出 1是，0否
    var isTop: Bool?
    var marketable: Int?
    var mileage: Double?//里程
    var mileageEn: Int?
    var modifyTime: String?
    var name: String?//车辆名称
    var nameEn: String?
    var new: Bool?
    var orderPrice: Double?//订购价
    var otherParameter: String?
    var otherParameterModel: [OtherinfoModel]?
    var otherParameterJson: [OtherinfoModel]?
    var otherParameterJsonNew: [EntitiesModel]?
    var owner: String?
    var ownerArea: String?
    var storeVal: String?
    var ownerPhone: String?
    var price: Double?//车辆价格
    var remark: String?
    var reportPdf: String?
    var reserve: Bool?
    var seatNum: Int?
    var sell: Bool?
    var seriesId: String?//车辆系列ID
    var stereoscopicImage: String?//360图片
    var storeId: Int?//车辆门店ID
    var styleId: Int?//车辆款式ID
    var top: Bool?
    var version: Int?
    var favorite: Int?//1：收藏,0:未收藏
    var serivceGuaranteeImage: String?//服务保障
    var storeName: String? //店名
    var styleName: String? //车型
    var shareText: String? //分享文本
    
    var firstAmount: Double?//首期金额
    var monthlyAmount: Double?//月供金额
    var interestRate = "3.50"//利率
    
    var assurance: String?//服务保障
    var videoUrl: String?//视频
    var carFacilityDetail: String?//车厢设备
//    var carRelationList: [CarDetailsContentModel]?
    
    
    func mapping(map: Map) {
        storeVal <- map["storeVal"]
        appearanceImages <- map["appearanceImages"]
        backgroundImage <- map["backgroundImage"]
        carNo <- map["carNo"]
        createdTime <- map["createdTime"]
        delFlag <- map["delFlag"]
        energy <- map["energy"]
        energyEn <- map["energyEn"]
        engine <- map["engine"]
        engineChassisImages <- map["engineChassisImages"]
        engineEn <- map["engineEn"]
        exfactoryDate <- map["exfactoryDate"]
        firstEn <- map["firstEn"]
        gearbox <- map["gearbox"]
        gearboxEn <- map["gearboxEn"]
        id <- map["id"]
        interiorImages <- map["interiorImages"]
        isMarketable <- map["isMarketable"]
        isReserve <- map["isReserve"]
        isSell <- map["isSell"]
        isTop <- map["isTop"]
        marketable <- map["marketable"]
        mileage <- map["mileage"]
        mileageEn <- map["mileageEn"]
        modifyTime <- map["modifyTime"]
        name <- map["name"]
        nameEn <- map["nameEn"]
        new <- map["new"]
        orderPrice <- map["orderPrice"]
        otherParameter <- map["otherParameter"]
        owner <- map["owner"]
        ownerArea <- map["ownerArea"]
        ownerPhone <- map["ownerPhone"]
        price <- map["price"]
        remark <- map["remark"]
        reportPdf <- map["reportPdf"]
        reserve <- map["reserve"]
        seatNum <- map["seatNum"]
        sell <- map["sell"]
        seriesId <- map["seriesId"]
        stereoscopicImage <- map["stereoscopicImage"]
        storeId <- map["storeId"]
        styleId <- map["styleId"]
        top <- map["top"]
        version <- map["version"]
        favorite <- map["favorite"]
        serivceGuaranteeImage <- map["serivceGuaranteeImage"]
        otherParameterJson <- map["otherParameterJson"]
        storeName <- map["storeName"]
        otherParameterJsonNew <- map["otherParameterJsonNew"]
        styleName <- map["styleName"]
        shareText <- map["shareText"]
        assurance <- map["assurance"]
        videoUrl <- map["videoUrl"]
        carFacilityDetail <- map["carFacilityDetail"]
//        carRelationList <- map["carRelationList"]
        ownerNum <- map["ownerNum"]
        
    }
    required init?(map: Map) {
        
    }
    init() {
        
    }
    
}*/


class OtherinfoModel:  Mappable {
    var name: String?
    var entities: [EntitiesModel]?
  
    func mapping(map: Map) {
        name <- map["name"]
        entities <- map["entities"]
      
    }
    required init?(map: Map) {
        
    }
}

class EntitiesModel:  Mappable {
    var paramType: Int?
    var paramId: Int?
    var paramName: String?
    var is_must: Int?
    var value: String?
    var valueEn: String?
    var paramNameHeight: CGFloat = 35
    var valueHeight: CGFloat = 35
    
    var orderBye: Int?
  
    func mapping(map: Map) {
        paramType <- map["paramType"]
        paramId <- map["paramId"]
        paramName <- map["paramName"]
        is_must <- map["is_must"]
        value <- map["value"]
        valueEn <- map["valueEn"]
        orderBye <- map["orderBye"]
    }
    required init?(map: Map) {
        
    }
    
    required init(){
        
    }
    
}

